import request2 from '@/utils/request2'
import { faceApiUrl, appApiUrl } from '@/api/config'

export default {
  del(params) {
    return request2({
      url: faceApiUrl + '/safetyOnSiteContentInfo/deleteByPrimaryKey', method: 'get', params
    })
  },
  list(params, data) {
    return request2({
      url: faceApiUrl + '/safetyOnSiteContentInfo/getPageSafetyOnSiteContentInfo', method: 'post', params, data
    })
  },
  detail(params, data) {
    return request2({
      url: faceApiUrl + '/safetyOnSiteContentInfo/getSafetyOnSiteContentInfoById', method: 'get', params, data
    })
  },
  add(params, data) {
    return request2({
      url: faceApiUrl + '/safetyOnSiteContentInfo/insertSelective', method: 'post', params, data
    })
  },
  edit(params, data) {
    return request2({
      url: faceApiUrl + '/safetyOnSiteContentInfo/updateByPrimaryKeySelective', method: 'post', params, data
    })
  },
  // 获取责任区域
  getSubContractor(id){
    return request2({
      url: appApiUrl + '/problem/getNodeStatusById/' + id, method: 'get'
    })
  }
}